package com.example.demothree.dao;

import com.example.demothree.bean.Goods;
import com.example.demothree.bean.Stock;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface StockDao extends JpaRepository<Stock,Long> {
    @Query("from Stock where id = ?1")
    public Stock findStockById(Long id);
    @Query("from Stock where goodsId = ?1")
    public Stock findStockBygoodsId(Long spid);
//    @Query("from Stock where id = ?1")
//    public Stock findStockById(Long id);

}
